<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.Vector,com.ejoysoft.wlanyz.business.Task,com.ejoysoft.wlanyz.business.Ap,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.IdObjectException,com.ejoysoft.common.exception.NoRightException" %>
<%@page import="com.ejoysoft.common.Format"%>
<%@page import="javax.crypto.Mac"%>
<%@ include file="../include/jsp/head.jsp"%>

<%
try{
if(!globa.userSession.hasRight("10020"))
      throw new NoRightException("用户不具备操作该功能模块的权限，请与系统管理员联系！");
	String strTaskId = ParamUtil.getString(request,"strTaskId","");
	
	if(strTaskId.equals(""))
    	throw new IdObjectException("请求处理的信息id为空！或者已经不存在");
    
    String where="where strTaskId='"+strTaskId+"'";
    Task obj=new Task(globa,false);
    Task obj1=obj.show(where);
   
    int intState = obj1.getIntIssued();
     //System.out.println("dddddddddddddddd"+intState);
    if(intState==0)
    {
    out.print("<script>alert('此任务未下发Ap！');window.history.back(-1);</script>");
    }
    String apIds = obj1.getStrApIds();
    System.out.println("LLLLLLLLL"+apIds);
    String str[] = {};
    if(apIds!=null){
    System.out.println("ppppppppp");
      str = apIds.split(",");
    }
    System.out.println("DDDDDDDDD");
    
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=application.getAttribute("APP_TITLE")%></title> 
<link href="../css/main.css" rel="stylesheet" type="text/css" /></link>
<script language="JavaScript" src="../include/date/popc.js"></script>
<script src="../include/js/list.js"></script>
<script language="javascript">
</script>
<style type="text/css">
</style>
</head>


<body>
<form name=frm method=post action="task_list.jsp"> 
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="absbottom" />&nbsp;您现在所在的位置：<font color="#0e7cc9">任务管理</font> &gt; 查看Ap详细信息</td>
  </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="8"></td>
        </tr><tr>
    <td height="25" valign="middle"><strong>&nbsp;AP详细信息</strong></td>
  </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    
    <td width="16%" class="listtit" style="border-left:1px solid #32a4ea;" >Mac地址</td>
    <td width="18%" class="listtit">设备名</td>
    <td width="16%" class="listtit">所属热点</td>
    <td width="16%" class="listtit">覆盖类型</td>
    <td width="16%" class="listtit">IP地址</td>    
    
  </tr>
    <%
      
      for (int i = 0; i < str.length; i++) 
      {
   	       String id = str[i];
   	       
   	       String where2="where device_Id='"+id+"'";
           Ap obj3 = new Ap(globa,false);
           Ap obj4 =obj3.show(where2);
           
    		String device_Id = "";
    		String device_Name = "";
    		String redian = "";
    		String fgType = "";
    		String ip = "";
    		String mac = "";
    		if (obj4.getDevice_Id() != null)device_Id = obj4.getDevice_Id();
    		if (obj4.getDevice_Name() != null)device_Name = obj4.getDevice_Name();
    		if (obj4.getStrHotSpot() != null)redian = obj4.getStrHotSpot();
    		if (obj4.getStrCoverage_Type() != null)fgType = obj4.getStrCoverage_Type();
    		if (obj4.getStrIp_Addr() != null)ip = obj4.getStrIp_Addr();
    		if (obj4.getStrMac_Addr() != null)mac = obj4.getStrMac_Addr();
    			
    %>

  <tr>
  	
    <td class="listd1" style="border-left:1px solid #dddddd;"> <%=mac%>&nbsp;</td>
    <td class="listd1"><%=device_Name%>&nbsp;</td>
    <td class="listd1"><%=Format.forbidNull(obj4.getStrHotSpotName())%>&nbsp;</td>
    <td class="listd1"><%=fgType%>&nbsp;</td>
    <td class="listd1"><%=ip%>&nbsp;</td>

     </tr>
             <%
             	}
             
             %>
             <tr>
              <td width = "15%"><input type="button"  onclick="window.location.href='task_list.jsp';" value="返 回" class="ipt2" style="cursor:hand"/></td>
</tr>
</table>






 </form>
</body>
</html>
<%     	}catch (Exception e) {
            e.printStackTrace();        
        } %>


<%@ include file="../include/jsp/footer.jsp"%>



